df sort by column names

31

df = df.reindex(sorted(df.columns), axis=1)
>>> result = df.sort(['A', 'B'], ascending=[1, 0])

Comments

Submit
0 Comments